<?php

$link=mysql_connect("localhost","root","");
mysql_select_db("demo_inventario");

if($_POST['origen']=="twitter")
{
	$query="DELETE FROM twitter_users WHERE id='".$_POST['palabras']."'";
	$consulta=mysql_query($query,$link);

	?>
	<script>
	redir("campanas/modificar.php?id=<?=$_POST['inicio']?>","fail",100);
	cerrarventanita();
	</script>
	
	<?php


}



if($_POST['origen']=="email")
{
	$query="DELETE FROM resultados_mail WHERE id='".$_POST['palabras']."'";
	$consulta=mysql_query($query,$link);

	?>
	<script>
	redir("campanas/modificar.php?id=<?=$_POST['inicio']?>","fail",100);
	cerrarventanita();
	</script>
	
	<?php



}
if($_POST['origen']=="telefono")
{
	$query="DELETE FROM campana_telefonica WHERE id='".$_POST['palabras']."'";
	$consulta=mysql_query($query,$link);

	?>
	<script>
	redir("campanas/modificar.php?id=<?=$_POST['inicio']?>","fail",100);
	cerrarventanita();
	</script>
	
	<?php



}
?>